import request from '@/utils/request'

export function getList(params) {
    return request({
        // baseURL:'http://localhost:8081',
        url: '/maodou-user/role/list',
        method: 'post',
        headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
        timeout: 15000,
        responseType: 'json',
        data: params
    })
}

export function getRoleOptions(params) {
    return request({
        url: '/maodou-user/role/options',
        method: 'get',
        headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
        timeout: 15000,
        responseType: 'json',
        // data: params
    })
}

export function addRole(params) {
    return request({
        // baseURL:'http://localhost:8081',
        url: '/maodou-user/role/add',
        method: 'post',
        headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
        timeout: 15000,
        responseType: 'json',
        data: params
    })
}

export function updateRole(params) {
    return request({
        // baseURL:'http://localhost:8081',
        url: '/maodou-user/role/update',
        method: 'post',
        headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
        timeout: 15000,
        responseType: 'json',
        data: params
    })
}